:root {
    --primary-color: #4CAF50;
    --hover-color: #45a049;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --border-color: #ddd;
    --text-color: #333;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.back-button {
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    margin-right: 20px;
}

h2 {
    margin: 0;
    flex-grow: 1;
    text-align: center;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: var(--hover-color);
}

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--text-color);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.toast.show {
    opacity: 1;
}

/* 首页特定样式 */
.tools-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.tool-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
}

.tool-card i {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.tool-card h3 {
    margin: 10px 0;
    color: var(--text-color);
}

.tool-card p {
    color: #666;
    margin-bottom: 15px;
}

.tool-card a {
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.tool-card a:hover {
    background-color: var(--hover-color);
}

/* JSON格式化工具特定样式 */
.json-textarea {
    width: 100%;
    height: 400px;
    padding: 10px;
    font-family: monospace;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    resize: vertical;
    background-color: white;
}

/* 时间戳转换工具特定样式 */
.conversion-section {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
}

.input-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.result {
    margin-top: 15px;
    padding: 10px;
    background-color: #f8f8f8;
    border-radius: 4px;
    word-break: break-all;
}

/* 二维码工具特定样式 */
.input-section {
    margin-bottom: 20px;
}

.options-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.option-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

#qrcode {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background-color: white;
    border-radius: 4px;
}

#qrcode img, #qrcode canvas {
    margin: 0 auto;
    display: block;
}

/* 二维码解析工具特定样式 */
.decode-section {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.input-area {
    text-align: center;
    margin: 20px 0;
}

#fileInput {
    display: none;
}

.upload-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.upload-btn:hover {
    background-color: var(--hover-color);
}

#preview {
    max-width: 100%;
    max-height: 300px;
    margin: 20px 0;
}

#video {
    width: 100%;
    max-width: 640px;
    margin: 20px auto;
    display: none;
}

/* 加密工具特定样式 */
textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    resize: vertical;
    font-family: monospace;
}

select {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 10px;
}

/* 在已有样式的基础上添加 */
.header.index-header {
    display: block;
    text-align: center;
    margin-bottom: 30px;
}

.header.index-header h1,
.header.index-header p {
    margin: 10px 0;
} 